<template>
<uni-shadow-root class="partials-organizes_list-type_one-index"><template name="typeOne">
<view class="container" :style="'height:'+(OrganizeshowWay==1? "100%":"")"> 
    <block v-if="OrganizeshowWay == 2">
     <view class="space_page_container2" :style="'height:'+(OrganizeshowWay==1? "100%":"")+';margin-top:'+(limitState!=0?"":"80rpx")">
        <block v-if="(!! organizeList)">
          <view v-for="(result,index) in (organizeList)" class="asset_item" v-if="limitState!=0?index<data.jsonData.count:'ture'" :data-link="'organize_detail.html?organizeId='+(result.id)" @click="tolinkUrl">
            <view class="asset_item_left">
              <image class="asset_img" mode="aspectFill" :src="result.firstImage"></image>
              <view class="asset_detail">
                <view class="asset_view" style="margin-bottom:10rpx">
                  <image class="asset_icon" :src="result.icon"></image>
                  <text class="asset_name">{{result.name}}</text>
                </view>
                <view class="asset_view">
                  <text class="asset_online_value">行业名</text>
                  <text class="asset_addtime">{{result.industry}}</text>
                </view>
                <view class="asset_view">
                  <text class="asset_online_value">联系人</text>
                  <text class="space_name">{{result.contactName}}</text>
                </view>
              </view>
            </view>
            <button @click.stop.prevent="calling" :data-phoneNumber="result.contactTelno" class="calling" v-if="result.contactTelno">
              <image class="calling_icon" src="https://image1.sansancloud.com/xianhua/2019_2/27/16/21/33_946.jpg"></image>
            </button>
          </view>
        </block>
        <block v-else>
          <view class="nospace">
            <image mode="widthFix" src="https://image1.sansancloud.com/xianhua/2019_12/16/15/54/55_950.jpg?x-oss-process=style/preview_120"></image>
            <text>没有相关商品</text>
          </view>
        </block>
      </view>
    </block>
    <block v-if="OrganizesshowWay == 1">
     <scroll-view class="space_page_container2" :style="'height:'+(OrganizesshowWay==1? "100%":"")">
          <map class="mapItem" id="map" :longitude="localPoint.longitude" :latitude="localPoint.latitude" scale="14" @controltap="controltap" :markers="markers" @markertap="markertap" @regionchange="regionchange" show-location="true" style="width: 100%; height: 100%;" @click="hiddenProInfo">
            <cover-view class="play">
               <cover-image class="img" src="../../images/icon/center.png" style="width:80rpx;height:80rpx;"></cover-image>
            </cover-view>
          </map>
          <cover-view class="bottom_tap">
            <cover-view class="return_index">
              <cover-image src="https://image1.sansancloud.com/xianhua/2018_9/13/16/50/14_226.jpg" class="return_index_img" @click="toIndex"></cover-image>
            </cover-view>
            <cover-view class="location">
              <cover-image src="https://image1.sansancloud.com/xianhua/2018_9/13/16/50/14_232.jpg" class="location_img" @click="clickcontrol"></cover-image>
            </cover-view>
          </cover-view>
          <cover-view class="space_data" v-if="organizesDetail!=null">
            <cover-view class="space_info">
              <cover-image class="space_info_left" :src="spaceDetail.spaceInfo.imagePath+'?x-oss-process=style/preview_120'"></cover-image>
              <cover-view class="space_info_center">
                <cover-view class="space_info_name">{{spaceDetail.spaceInfo.name}}</cover-view>
                <cover-view class="space_info_service_time">
                  <cover-image class="space_info_service_time_img" src="https://image1.sansancloud.com/santigongxiang/2018_10/10/18/22/0_933.jpg"></cover-image>
                  <cover-view class="space_info_service_time_value">{{spaceDetail.spaceInfo.categoryName}}</cover-view>
                </cover-view>
                <cover-view class="space_info_service_addr">
                  <cover-image class="space_info_service_addr_img" src="https://image1.sansancloud.com/xianhua/2018_9/13/17/57/21_219.jpg"></cover-image>
                  <cover-view class="space_info_service_addr_value" style="width:96%; word-break: break-all;text-overflow: ellipsis;white-space: nowrap;">{{spaceDetail.spaceInfo.location}}</cover-view>
                </cover-view>
              </cover-view>
              <cover-view class="space_info_right" @click="toSpaceDetail" :data-info="spaceDetail.spaceInfo">
                <cover-view class="line"></cover-view>
                <cover-image src="https://image1.sansancloud.com/xianhua/2018_9/13/20/11/36_801.jpg?x-oss-process=style/preview_120" class="navigation"></cover-image>
              </cover-view>
            </cover-view>
          </cover-view>
      </scroll-view>
    </block>
</view>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/organizes_list/type_one/index'

Component({})

export default global['__wxComponents']['partials/organizes_list/type_one/index']
</script>
<style platform="mp-weixin">
.space_page_container2{
  background:#fff;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.asset_item{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  box-shadow:4rpx 4rpx 10rpx #ddd;
  margin: 20rpx;
  height: 180rpx;
  border-radius: 20rpx;
}
.asset_item_left{
  display: flex;
  align-items: center;
  flex-direction: row;
  height:180rpx;
  width:90%;
}
.asset_img{
  width: 180rpx;
  height: 100%;
  border-radius: 20rpx;
}
.asset_detail{
  display: flex;
  flex-direction: column;
  margin-left: 30rpx;
  width: 66%
}
.asset_view{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 6rpx;
  color: #888;
  font-size: 28rpx;
}
.asset_icon{
  width: 46rpx;
  height: 46rpx;
  margin-right: 30rpx;
}
.asset_name{
  font-size: 32rpx;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  width:80%;
}
.space_name{
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  width:70%;
}
.asset_online_value{
  color: #C0271F;
  margin-right: 20rpx;
}
.asset_state_text{
  color: #C0271F;
  margin-right: 20rpx;
}
.asset_price{
  color: #C0271F;
  font-size: 34rpx;
  font-weight: bold;
  margin-right: 20rpx;
}
.asset_unit{
  font-size: 28rpx
}
.lease_name{
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  width:80%;
}
.calling{
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 24rpx;
  color: #fff;
  border-radius: 50rpx;
  padding: 10rpx;
  margin-right:20rpx;
  border: 1px solid #999; 
  outline: none;   
  background:#fff;

}
.calling_icon{
  width: 26rpx;
  height: 26rpx;
}
/* 没有商品时 */
.nospace{
  position: absolute;
  top: 170rpx;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: x-small;
}
.nospace image{
  width: 30%;
}
.active{
  border-bottom: 2rpx solid #FE5722;
}
.mapItem{
  position: relative;
  z-index: 1;
}
.bottom_tap{
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 120rpx;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding:0 60rpx;
  margin-bottom:20rpx;
  box-sizing: border-box;
  z-index: 2;
}
.return_index{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 28rpx;
  border-radius: 50rpx;
  width: 50rpx;
  height: 50rpx;
  padding: 20rpx;
}
.return_index_img{
  width: 40rpx;
  height: 40rpx;
  background-blend-mode:lighten;
  background-size:cover;
  }
 .location{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 28rpx;
  border-radius: 50rpx;
  width: 50rpx;
  height: 50rpx;
  padding: 20rpx;
 }
 .location_img{
    width: 50rpx;
    height: 50rpx;
    background-blend-mode:lighten;
    background-size:cover;
  }
  .space_data{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 220rpx;
    width: 100%;
    padding: 0 20rpx;
    box-sizing: border-box;
    position:fixed;
    bottom:150rpx;
    z-index: 2;
  } 
  .space_info{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 220rpx;
    width: 100%;
    background: #fff;
    border-radius: 20rpx;
    padding: 20rpx;
    box-sizing: border-box;
  }
  .space_info_left{
    border-radius: 20rpx;
    margin-right: 20rpx;
    width: 150rpx;
    height: 150rpx
  }
  .space_info_center{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 26rpx;
    width: 320rpx;
    height:150rpx;
    color: #ccc;
    margin-top:6rpx;
  }
  .space_info_name{
    font-weight: bold;
    font-size: 30rpx;
    color: #000;
    margin-bottom:10rpx;
    word-break: break-all;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp:2;
  }
  .space_info_service_time{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom:10rpx;
  }
  .space_info_service_addr{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom:10rpx;
  }
  .space_info_service_addr_img{
    width: 30rpx;
    height: 30rpx;
    margin-right: 10rpx
  }
  .space_info_service_time_img{
    width: 30rpx;
    height: 30rpx;
    margin-right: 10rpx
  }
  .space_info_right{
    margin-left: 40rpx;
    width: 100rpx;
    height: 150rpx;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20rpx;
  }
  .line{
    width: 2rpx;
    background: #888;
    height: 150rpx;
  }
  .navigation{
    width: 60rpx;
    height: 60rpx;
  }
  /* tab */
  .tab-h{
    height: 68rpx;
    width: 100%; 
    box-sizing: border-box;
    overflow: hidden;
    line-height: 68rpx;
    font-size: 24rpx; 
    white-space: nowrap;
     }
     .tab-item{
     margin-left: 60rpx;
     height: 60rpx;
     display: inline-block;
   }
    .tab-item:first-child{
     margin-left: 40rpx;
     height: 60rpx;
     display: inline-block;
   }
</style>